import React from "react";
import { IS_H5, IS_WEAPP } from ".";
/*
  滚到顶部
 */
export const scrollTop = (ScrollViewRef: React.MutableRefObject<any>) => {
  if (IS_WEAPP) {
    ScrollViewRef.current.setAttribute("scrollTop", 0);
  } else if (IS_H5) {
    ScrollViewRef.current.scrollTop = 0;
  }
};
